package com.kangfu.wechat.api;


import okhttp3.HttpUrl;

import java.util.HashMap;
import java.util.Map;

public class BaseApi {

    public static final String BASE_URI = "https://api.weixin.qq.com";


    public static String parseParams(String url, HashMap<String, String> params) {
        HttpUrl.Builder urlBuilder = HttpUrl.parse(url).newBuilder();
        for (Map.Entry < String, String > entry: params.entrySet()) {
            urlBuilder.addQueryParameter(entry.getKey(), entry.getValue());
        }
        return urlBuilder.build().toString();
    }

}
